<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <title>{block name="title"}点赚金-后台管理{/block}</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" type="text/css" href="__ASSETS__/lib/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="__ASSETS__/stylesheets/theme.css">
    <link rel="stylesheet" href="__ASSETS__/lib/font-awesome/css/font-awesome.css">

    <script src="__ASSETS__/lib/jquery-1.8.1.min.js" type="text/javascript"></script>

    <!-- Demo page code -->
    
    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>
    {block name="css"}
    {/block}
  </head>

  <body> 
    
    <div class="navbar">
        <div class="navbar-inner">
            <div class="container-fluid">
                <ul class="nav pull-right">
                    
                    <li id="fat-menu" class="dropdown">
                        <a href="#" id="drop3" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i> {$Think.Session.admin_name}
                            <i class="icon-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu">
                            <li><a data-title="rest password" data-toggle="modal" data-target="#reset_admin" tabindex="-1" href="#">修改密码</a></li>
                            <li class="divider"></li>
                            <li><a tabindex="-1" href="{:url('index/logout')}">退出登录</a></li>
                        </ul>
                    </li>
                    
                </ul>
                <a class="brand" href="{:url('index/index/login')}"><span class="first">点赚金</span> <span class="second">二手交易平台</span></a>
            </div>
        </div>
    </div>
    

    <div class="container-fluid">
        
        <div class="row-fluid">
          <!-- 侧边栏 -->
            <div class="span3">
                <div class="sidebar-nav">
                <!-- 一个菜单项 -->
                  <div class="nav-header" data-toggle="collapse" data-target="#user-menu"><i class="icon-user"></i>用户管理</div>
                    <ul id="user-menu" class="nav nav-list collapse in">
                        <li><a href="{:url('userdo/userList')}">用户列表</a></li>
                        <li><a href="{:url('userdo/deleteUserList')}">已删除用户列表</a></li>                 
                    </ul>
                <!-- 一个菜单项 -->
                <div class="nav-header" data-toggle="collapse" data-target="#commodity-menu"><i class="icon-th-large"></i>商品管理</div>
                <ul id="commodity-menu" class="nav nav-list collapse in">
                  <li ><a href="{:url('commoditydo/getUnauditedCommodityList')}">未审核商品列表</a></li>
                  <li ><a href="{:url('commoditydo/getAuditedCommodityList')}">已审核商品列表</a></li>
                  <li ><a href="{:url('commoditydo/getSoleCommodityList')}">已售出商品列表</a></li>
                </ul>

                <div class="nav-header" data-toggle="collapse" data-target="#category-menu"><i class="icon-tags"></i>分类管理</div>
                <ul id="category-menu" class="nav nav-list collapse in">
                  <li ><a href="{:url('categorydo/getCategoryList')}">分类列表</a></li>
                </ul>

                <div class="nav-header" data-toggle="collapse" data-target="#order-menu"><i class="icon-shopping-cart"></i>订单管理</div>
                <ul id="order-menu" class="nav nav-list collapse in">
                  <li ><a href="{:url('orderdo/getOrder')}">未完成订单</a></li>
                  <li ><a href="{:url('orderdo/getDoneOrder')}">已完成订单</a></li>
                  <li ><a href="{:url('orderdo/getDeleteOrder')}">已删除订单</a></li>
                </ul>
                <div class="nav-header" data-toggle="collapse" data-target="#cash-menu"><i class="icon-credit-card"></i>提现管理</div>
                <ul id="cash-menu" class="nav nav-list collapse in">
                  <li ><a href="{:url('cashdo/getUnauditedCashList')}">待审核提现记录</a></li>
                  <li ><a href="{:url('cashdo/getAuditedCashList')}">已审核提现记录</a></li>
                </ul>
                <div class="nav-header" data-toggle="collapse" data-target="#cash-menu"><i class="icon-credit-card"></i>配送员管理</div>
                <ul id="cash-menu" class="nav nav-list collapse in">
                  <li ><a href="{:url('courierdo/getCourierList')}">配送员管理</a></li>
                  <li ><a href="{:url('courierdo/registercode')}">注册码</a></li>
                </ul>
            </div>
        </div>
        <!-- 侧边栏 -->
        <div class="span9">
          <h1 class="page-title">{block name="pageName"}{/block}</h1>
          <!-- 页面体 -->
          {block name="pageBody"}
          <div class="row-fluid">
              <div class="block">
                  <p class="block-heading" data-toggle="collapse" data-target="#chart-container">Performance Chart</p>
                  <div id="chart-container" class="block-body collapse in">
                      <div id="line-chart"></div>
                  </div>
              </div>
          </div>
          {/block}
          <!-- 页面体 -->
        </div>
        </div>
    <footer>
        <hr>        
        <p>&copy; 2019 <a href="http://www.neusoft.edu.cn/">大连东软信息学院</a></p>
        <p>PHP课程实践 李佳伟 蒙樊健 王磊</p>
    </footer>

    {block name="model"}
    {/block}
    <script>
      function resetAdmin(){
        var form = new FormData(document.getElementById("resetAdmin"));
        $.ajax({
            url:"{:url('index/resetPassword')}",
            type:"post",
            data:form,
            processData: false,                // jQuery不要去处理发送的数据
            contentType: false,
            dataType: 'json',
            success:function(data){
              if (0 == data.code) {
                alert(data.msg);
                window.location.href="{:url('index/logout')}";
              }else{
                alert(data.msg);
              }
               
            }
            }); 
    }
  </script>
  <div id="reset_admin" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3 id="myModalLabel">重置密码</h3>
    </div>
    <form id="resetAdmin" class="form-horizontal" onsubmit="return false;" method="post">
      <br>
      <input type="hidden" name="admin_id" value="{$Think.Session.admin_id}"><br>
      <div class="control-group">
          <label class="control-label">原密码</label>
          <div class="controls">
            <input type="password" name="old" placeholder="请输入原密码" required><br>
        </div>
      </div>
      <div class="control-group">
          <label class="control-label">新密码</label>
          <div class="controls">
            <input type="password" name="new" placeholder="请输入新密码" required><br>
        </div>
      </div>
    </form>
    <div class="modal-footer">
      <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
      <input class="btn" type="button" value="提交" onclick="resetAdmin();">
    </div>
  </div>


    <script src="__ASSETS__/lib/bootstrap/js/bootstrap.js"></script>

  </body>
</html>


